'use strict';
app.service('chainEditService',['utilService','$q',function(utilService,$q){
    var _this_=this;
    _this_.updateChain=function($scope){
        var deferred=$q.defer();
        utilService.api({
            url:$scope.app.domain+'chain',
            data:$scope.chain,
            method:'PUT'
        }).then(
            function(rlt){
                deferred.resolve(rlt);
            }
        );
        return deferred.promise;
    }
}]);